import requests,pytest,allure_pytest,allure
class Test_kies():
    #初始化用例
    def setup_class(self):
        self.req=requests.session()
    #执行用例

    def test_001(self):
        url='http://10.59.9.32/jeewms/loginController.do?checkuser'
        hed={"userName":"admin","password":"llg123","randCode":"9037","langCode":"zh-cn","orgId":""}
        a=self.req.post(url=url,json=hed)
        print(a.json())
        # assert '请输入' in a.json()
        assert a.status_code==200

        # 执行用例
    def test_002(self):
        url='http://10.59.9.32/jeewms/baPlatformController.do?doAdd'
        hed={"id":"","platformCode":"54555","platformName":"AJDH"}
        body={"cookie":"JSESSIONID=95A4F7B415869866382F05C68D4289AD; JEECGINDEXSTYLE=ace; ZINDEXNUMBER=2020"}
        a=self.req.post(url=url,headers=body,json=hed)
        print(a.json())
        assert '添加成功' in a.json()
        assert a.status_code==200